package com.sinovatio.dbserver.common;


import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = true)
public class BaseException extends RuntimeException {

    private final int code;
    private final String message;

    public BaseException(int code) {
        this.code = code;
        this.message = ResultCode.getMessage(code);
    }

    public BaseException(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
